/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package add;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 *
 * @author houfukude
 */
public class add {
    public static void add(int n,int m){
        if(n==m){
            if(m==1){
                System.out.println("1 ");
            }else{
                System.out.print(n+" ");
                add(n,n-1);
            }
        }else if(m>n){
            if(n>1){
                add(n,m-1);
                add(n-m,m);
            }else{
                throw new UnsupportedOperationException("m or n is 0");
            }
            
        }else{
            add(n,n);
        }
        
        
    }

    public static void main(String args[]) throws IOException{
        System.out.println("Input a number");
        BufferedReader b = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(b.readLine());
        add(N,N);
    }

    
}
